#include <iostream>
#include <stdio.h>
using namespace std;
typedef long long ll;
int main() {
	ll a,b,tmp;
	while (cin>>a>>b) {
		ll ans=0;
		ll who;
		if (a<b) swap(a,b);
		while (a%b!=0) {
			if (a/b>1) {
				who=ans%2;
				break;
			}
			tmp=a;
			a=b;
			b=tmp%b;
			ans++;
		}
		who=ans%2;
		if (who==0) cout<<"win"<<endl;
		else cout<<"lose"<<endl; 
	}
	return 0;
}
